package com.woniuxy.controller;

import com.github.pagehelper.PageInfo;
import com.woniuxy.entity.DTO.DeliveryDTO;
import com.woniuxy.service.DeliveryService;
import com.woniuxy.util.PageParam;
import com.woniuxy.util.ResponseData;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/delivery")
public class DeliveryController {
    @Resource
    private DeliveryService deliveryService;

    @PostMapping("/queryDeliveryByCondition")
    public ResponseData queryDeliveryByCondition(@RequestBody PageParam<DeliveryDTO> pageParam){
        PageInfo pageInfo = deliveryService.queryAllInfo(pageParam);
        return ResponseData.success(pageInfo);
    }
}
